#ifndef DEFECTLEVELMAP_H
#define DEFECTLEVELMAP_H


#include "src/Entity/clientdefect.h"
#include <QObject>
#include<QMap>
//缺陷等级映射表 用于映射数组中最严重的缺陷

enum DefectLevel {
    Level1 = 1,  // 一级
    Level2 = 2,  // 二级
    Level3 = 3,  // 三级
    Level4 = 4   // 四级
};

class DefectLevelMap : public QObject
{
    Q_OBJECT
public:
    explicit DefectLevelMap(QObject *parent = nullptr);

    const QMap<QString, DefectLevel> defectLevelMap = {
        {"炼钢孔洞", Level1}, {"折叠", Level1},
        {"疤痕", Level2}, {"大型脱皮", Level2}, {"炼钢-热轧裂边", Level2}, {"热轧二类轧入异物", Level2},
        {"炼钢边部热裂", Level3}, {"二类脱皮", Level3}, {"裂纹或刮伤", Level3},
        {"酸洗不足", Level4}, {"热轧二类氧化皮脱落痕", Level4}
    };

    QString GetHighLevelDefect(QList<QString> list);

signals:
};

#endif // DEFECTLEVELMAP_H
